package com.imooc.service.impl;

import com.imooc.dataobject.SellerInfo;
import com.imooc.enums.ResultEnum;
import com.imooc.exception.SellException;
import com.imooc.repository.SellerUserRepository;
import com.imooc.service.SellerService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
@Slf4j
public class SellerServiceImpl implements SellerService {

    @Autowired
    private SellerUserRepository repository;

    @Override
    public SellerInfo findOne(String sellerId) {
        SellerInfo sellerInfo = repository.findById(sellerId).get();
        if (sellerInfo == null) {
            log.info("【卖家用户登录查询】 查询失败， sellerId={}", sellerId);
        }
        return sellerInfo;
    }
}
